home *** CD-ROM | disk | FTP | other *** search
/ Business Shareware / Business Shareware.iso / start / gfxapps / intract2 / interact.doc < prev    next >
Text File  |  1993-01-11  |  38KB  |  1,097 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                INTERACT
  8.                               ==========
  9.  
  10.                              VERSION 2.0
  11.  
  12.                            January 11, 1993
  13.  
  14.                    Code & design by Christer Janson
  15.  
  16.                              Autodesk AB
  17.  
  18.              For free distribution only - NOT FOR RESALE
  19.  
  20.  
  21.  
  22.  
  23.  
  24.     TABLE OF CONTENTS
  25.     =================
  26.  
  27.     1.0   INTRODUCTION
  28.  
  29.     2.0   LANGUAGE - Interactive BASIC
  30.  
  31.     2.1   MENU
  32.     2.2   CLEARAREA
  33.     2.3   INITAREA
  34.     2.4   PLAY
  35.     2.5   PRELOAD
  36.     2.6   COLOR
  37.     2.7   HIDECURSOR
  38.     2.8   SHOWCURSOR
  39.     2.9   CLS
  40.     2.10  GOTOXY
  41.     2.11  PAINT
  42.     2.12  BORDER
  43.     2.13  GETKEY
  44.     2.14  EXECUTE
  45.     2.15  OPENWINDOW
  46.     2.16  CLOSEWINDOW
  47.     2.17  PRINT
  48.     2.18  INPUT
  49.     2.19  IF - THEN
  50.     2.20  FOR - TO - NEXT
  51.     2.21  GOTO
  52.     2.22  GOSUB - RETURN
  53.     2.23  END
  54.     2.24  REM
  55.  
  56.     3.0   USING INTERACT
  57.     3.1   TIPS & TRICKS
  58.  
  59.     4.0   TECHNICAL INFORMATION - CONFIGURATION
  60.  
  61.     5.0   HISTORY - WHAT'S NEW
  62.  
  63.     6.0   DISCLAIMER
  64.  
  65.  
  66.     1.0 INTRODUCTION
  67.     ================
  68.  
  69.     Interact is a fully programmable presentation program, capable of viewing
  70.     animations and still images while waiting for user feedback, such as 
  71.     mouse picks or keystrokes. A presentation is created using the language
  72.     Interactive BASIC, similar to standard BASIC.
  73.     Among other things, Interact can handle tasks like:
  74.     
  75.       * Playing animations or viewing still images while waiting for user
  76.         interaction like mouse picks, keystrokes or timeout events.
  77.  
  78.       * Play animations and view still images.
  79.  
  80.       * Execute programs from within Interact.
  81.  
  82.       * Console management, such as overlapping text windows, user input,
  83.         text output and cursor control.
  84.  
  85.       * Most standard BASIC features, such as:
  86.         integer variables, IF..THEN statements, GOTO/GOSUB-RETURN branches,
  87.         FOR..TO..NEXT loops and more.
  88.  
  89.     Interact supports the standard FLI/FLC animation file format used by
  90.     Autodesk Animator, Animator PRO, Autodesk 3D Studio, Multimedia Explorer
  91.     and CHAOS: The Software.
  92.  
  93.  
  94.     2.0   LANGUAGE - Interactive BASIC
  95.     ==================================
  96.  
  97.         Interact reads commands from standard ASCII files containing
  98.         Interactive BASIC statements. Type in your program in a text
  99.         editor to a file with the extension ".ib" and supply the filename
  100.         as the first argument to Interact on the DOS command line.
  101.         If the extension is not ".ib" you will have to supply the full
  102.         filename, including extension.
  103.         If you prefer typing in the Interactive BASIC file using a word
  104.         processor, you must make sure that the word processor does not insert
  105.         formatting codes into the text. Save the file as a standard ASCII 
  106.         text file without formatting.
  107.         Below is a list of all commands available in Interactive BASIC.
  108.  
  109.  
  110.     2.1   MENU
  111.     ==========
  112.  
  113.         Purpose: Play a FLI/FLC animation or view a still image (GIF/PCX) 
  114.                  while waiting for user input.
  115.  
  116.         Format: MENU filespec, keylist [,SPEED=s][,TIMEOUT=t][,DEFAULT=d]
  117.  
  118.         Remarks: 
  119.  
  120.             The return value of MENU is placed in the reserved integer variable
  121.             ITEM. You can use the BASIC command IF ... THEN to test the value
  122.             of ITEM after a MENU command.
  123.             If the mouse has been initialized with the INITAREA statement
  124.             and an area has been picked with the left mouse button, the 
  125.             ITEM variable will contain a negative number specifying which
  126.             area has been picked.
  127.             * See also the INITAREA statement.
  128.  
  129.             filespec    is a string containing the filename of the FLI, FLC,
  130.                         GIF or PCX file. If the file is not in the current
  131.                         directory the path must be supplied.
  132.  
  133.             keylist     is a string containing a list of the keys to recognize
  134.  
  135.             SPEED=s     - Optional - 
  136.                         specifies the animation playback speed.
  137.                         The parameter is an integer expression specifying 
  138.                         milliseconds per frame. Default value is the default
  139.                         playback speed of the animation.
  140.                         If the file is a GIF or PCX file the SPEED parameter
  141.                         is ignored.
  142.                         
  143.             TIMEOUT=t   - Optional - 
  144.                         specifies how long to wait for user input before
  145.                         returning with the default value or 0 if no DEFAULT
  146.                         is specified. The parameter is an integer expression 
  147.                         specifying the number of seconds to wait.
  148.                         Default value is 0 which means that the animation 
  149.                         will play forever or until a key is pressed.
  150.  
  151.             DEFAULT=d   - Optional -
  152.                         specifies which of the keys in keylist that will be
  153.                         returned when TIMEOUT time has elapsed or if the
  154.                         user pressed ENTER or the right mouse button.
  155.                         If no DEFAULT value is specified, ITEM is set to 0.
  156.                         The parameter is an integer expression specifying
  157.                         the item in the keylist, where 1 is the first item.
  158.  
  159.         Example: Play a flic while waiting for specific keystrokes.
  160.  
  161.             MENU "C:\ANI\MRNUMO.FLC", "123Q", DEFAULT=4, TIMEOUT=60, SPEED=100
  162.             IF ITEM = 1 THEN GOTO 100
  163.             IF ITEM = 2 THEN GOTO 200
  164.             IF ITEM = 3 THEN GOTO 300
  165.             IF ITEM = 4 THEN END
  166.  
  167.  
  168.         Example 2: Play a flic while waiting for mouse picks or keystrokes.
  169.  
  170.             CLEARAREA                                 ; Clear all areas
  171.             INITAREA 1, 20, 20, 50, 50                ; Initialize area 1
  172.             INITAREA 2, 100, 20, 130, 50              ; Initialize area 2
  173.             INITAREA 3, 220, 20, 250, 50              ; Initialize area 3
  174.             INITAREA 4, 600, 440, 640, 480            ; Initialize area 4
  175.             MENU "FLIMENU.FLC", "123Q", DEFAULT=1
  176.             IF ITEM = -1 THEN GOTO 100                ; Area 1 selected
  177.             IF ITEM = -2 THEN GOTO 200                ; Area 2 selected
  178.             IF ITEM = -3 THEN GOTO 300                ; Area 3 selected
  179.             IF ITEM = -4 THEN END                     ; Area 4 selected
  180.             IF ITEM = 1 THEN GOTO 100                 ; Key "1" pressed
  181.             IF ITEM = 2 THEN GOTO 200                 ; Key "2" pressed
  182.             IF ITEM = 3 THEN GOTO 300                 ; Key "3" pressed
  183.             IF ITEM = 4 THEN END                      ; Key "Q" pressed
  184.  
  185.  
  186.     2.2   CLEARAREA
  187.     ===============
  188.  
  189.         Purpose: Reset and clear all mouse areas.
  190.  
  191.         Format: CLEARAREA
  192.  
  193.         Remarks:
  194.  
  195.             If you previously have defined mouse areas with the INITAREA
  196.             statement you must use CLEARAREA to reset the area definition
  197.             after the MENU statement, or the area definitions will be active
  198.             for all MENU statements.
  199.  
  200.  
  201.     2.3   INITAREA
  202.     ==============
  203.  
  204.         Purpose: Define mouse areas for the MENU statement.
  205.  
  206.         Format: INITAREA areanum, x1, y1, x2, y2
  207.  
  208.         Remarks: 
  209.  
  210.             INITAREA is used before the MENU statement to define areas
  211.             that can be picked by positioning the mouse pointer in the area
  212.             and press the left mouse button.
  213.             Once your areas have been defined, you can clear all defined
  214.             areas with the CLEARAREA statement, or you can overwrite single
  215.             area definitions by defining a new area with the same 'areanum'
  216.             parameter. There is no limitation for the number of areas that
  217.             can be defined.
  218.  
  219.             areanum     is an integer specifying the id of the area.
  220.  
  221.             x1, y1      is the upper left pixel coordinate of the area.
  222.  
  223.             x2, y2      is the lower right pixel coordinate of the area.
  224.  
  225.  
  226.     2.4   PLAY
  227.     ==========
  228.  
  229.         Purpose: Play a FLI/FLC animation or view a GIF/PCX still image.
  230.  
  231.         Format: PLAY filespec [,SPEED=s][,LOOP=l][,NOBREAK]
  232.  
  233.         Remarks: 
  234.  
  235.             filespec    is a string containing the filename of the FLI, FLC,
  236.                         GIF or PCX file.
  237.  
  238.             SPEED=s     - Optional - 
  239.                         specifies the animation playback speed.
  240.                         The parameter is an integer expression specifying 
  241.                         milliseconds per frame. Default value is the default
  242.                         playback speed of the animation.
  243.                         If the file is a GIF or PCX file the SPEED parameter
  244.                         is ignored.
  245.                         
  246.             LOOP=l      - Optional - 
  247.                         specifies how many times the animation will be played
  248.                         before it stops. Default value is forever.
  249.                         If the file is a GIF or PCX file the LOOP parameter
  250.                         is ignored.
  251.  
  252.             NOBREAK    - Optional -
  253.                         specifies that the animation will ignore keystrokes
  254.                         while playing. If NOBREAK is omitted the animation
  255.                         will stop when any key is pressed on the keyboard.
  256.                         If NOBREAK is supplied a valid value for LOOP must
  257.                         be supplied.
  258.                         If the file is a GIF or PCX file the NOBREAK
  259.                         parameter is ignored.
  260.  
  261.         Example:
  262.  
  263.             PLAY "C:\ANI\MRNUMO.FLC", SPEED=100, LOOP=10, NOBREAK
  264.  
  265.  
  266.     2.5   PRELOAD
  267.     =============
  268.  
  269.         Purpose: Load GIF and PCX images into memory for instant display.
  270.  
  271.         Format: PRELOAD filespec
  272.  
  273.         Remarks: 
  274.  
  275.             filespec    is a string containing the filename of the GIF or PCX
  276.                         file.
  277.  
  278.             Using GIF or PCX files with PLAY or MENU statements can be slow,
  279.             (loading a 640x480 GIF file on a 386 class machine can take more
  280.             than 10 seconds!)
  281.             It is therefore recommended that at the start of the presentation
  282.             the most displayed GIF/PCX files are preloaded. 
  283.             When a picture is preloaded the raster is read and uncompressed
  284.             into memory so that it displays immediately when referenced
  285.             by MENU or PLAY.
  286.             If there is not enough memory available to preload an image, the
  287.             PRELOAD statement will be ignored.
  288.  
  289.             Note: If you use this feature you will have to increase the 
  290.             memory assigned to Interact.
  291.  
  292.             Refer to section 4.0 (DOS/4GW Configuration) for DOS Extender and
  293.             memory size information.
  294.  
  295.         Example:
  296.  
  297.                PRELOAD "MENU.GIF"
  298.                PRELOAD "IMAGE.PCX"
  299.  
  300.             10 MENU "MENU.GIF", "1Q", DEFAULT=1
  301.                IF ITEM = 1 THEN GOTO 20
  302.                IF ITEM = 2 THEN GOTO 30
  303.                GOTO 10
  304.  
  305.             20 PLAY "IMAGE.PCX"
  306.                GOTO 10
  307.  
  308.             30 END
  309.  
  310.  
  311.     2.6   COLOR
  312.     ===========
  313.  
  314.         Purpose: Set the screen color of the following printouts.
  315.  
  316.         Format: COLOR value
  317.  
  318.         Remarks: 
  319.  
  320.             value      is an integer expression specifying the color.
  321.                        The color is calculated with the following formula:
  322.                        fg (0-15)   = Foreground color.
  323.                        bg (0-7)    = Background color.
  324.                        Blink (128) = Add if you want blinking foreground.
  325.  
  326.                        Color = fg + 16*bg + blink
  327.  
  328.                        Color values 0 - 15 specifies the standard textmode
  329.                        colors:
  330.                                0  - BLACK
  331.                                1  - BLUE
  332.                                2  - GREEN
  333.                                3  - CYAN
  334.                                4  - RED
  335.                                5  - MAGENTA
  336.                                6  - BROWN
  337.                                7  - LIGHTGRAY
  338.                                8  - DARKGRAY
  339.                                9  - LIGHTBLUE
  340.                                10 - LIGHTGREEN
  341.                                11 - LIGHTCYAN
  342.                                12 - LIGHTRED
  343.                                13 - LIGHTMAGENTA
  344.                                14 - YELLOW
  345.                                15 - WHITE
  346.  
  347.         Example:
  348.  
  349.             COLOR 30   - Yellow forground on blue background.
  350.  
  351.  
  352.     2.7   HIDECURSOR
  353.     ================
  354.  
  355.         Purpose: Hide the cursor.
  356.  
  357.         Format: HIDECURSOR
  358.  
  359.         Remarks: 
  360.  
  361.             Do not forget a matching call to SHOWCURSOR before quitting to
  362.             DOS and before using the EXECUTE command, otherwise the cursor will
  363.             not be visible in DOS or your program.
  364.  
  365.         Example:
  366.  
  367.             HIDECURSOR
  368.  
  369.  
  370.     2.8   SHOWCURSOR
  371.     ================
  372.  
  373.         Purpose: Show the cursor
  374.  
  375.         Format: SHOWCURSOR
  376.  
  377.         Remarks: 
  378.  
  379.             Use this command to show the cursor after it has been hidden
  380.             with the HIDECURSOR command.
  381.  
  382.         Example:
  383.  
  384.             SHOWCURSOR
  385.  
  386.  
  387.     2.9   CLS
  388.     =========
  389.  
  390.         Purpose: Clear the screen.
  391.  
  392.         Format: CLS
  393.  
  394.         Remarks: 
  395.  
  396.             Clear the screen and positions the cursor at 1,1 (top left)
  397.             This command may not work if your text screen has other
  398.             resolution than 80x25. The screen will automaticly be cleared
  399.             after playing an animation.
  400.  
  401.         Example:
  402.  
  403.             CLS
  404.  
  405.  
  406.     2.10   GOTOXY
  407.     =============
  408.  
  409.         Purpose: Move cursor.
  410.  
  411.         Format: GOTOXY x, y
  412.  
  413.         Remarks: 
  414.  
  415.             x          is an integer expression specifying the column.
  416.  
  417.             y          is an integer expression specifying the row.
  418.  
  419.             Top left is 1,1. You can use this command before the PRINT
  420.             command if you want to print text at a specific location.
  421.  
  422.         Example:
  423.  
  424.             GOTOXY 40,12
  425.  
  426.  
  427.     2.11   PAINT
  428.     ============
  429.  
  430.         Purpose: Paint an area on the screen.
  431.  
  432.         Format: PAINT x1, y1, x2, y2, color
  433.  
  434.         Remarks: 
  435.  
  436.             x1         is an integer expression specifying the left column.
  437.  
  438.             y1         is an integer expression specifying the top row.
  439.  
  440.             x2         is an integer expression specifying the right column.
  441.  
  442.             y2         is an integer expression specifying the bottom row
  443.  
  444.             color      is an integer expression specifyin the color of the
  445.                        area.
  446.  
  447.             X coordinates are interger expressions between 1 and 80.
  448.             Y coordinates are interger expressions between 1 and 25.
  449.             Refer to the COLOR command for how to calculate color values.
  450.             This command may not work properly if you have other screen
  451.             resolution than 80x25.
  452.  
  453.         Example: 
  454.  
  455.             PAINT 1,1,80,25,30
  456.  
  457.  
  458.     2.12   BORDER
  459.     =============
  460.  
  461.         Purpose: Draw a border on the screen.
  462.  
  463.         Format: BORDER x1, y1, x2, y2, color, type
  464.  
  465.         Remarks: 
  466.  
  467.             x1         is an integer expression specifying the left column.
  468.  
  469.             y1         is an integer expression specifying the top row.
  470.  
  471.             x2         is an integer expression specifying the right column.
  472.  
  473.             y2         is an integer expression specifying the bottom row
  474.  
  475.             color      is an integer expression specifyin the color of the
  476.                        border.
  477.  
  478.             type       is an integer expression specifying the type of the 
  479.                        border. Valid types are 1 for single border and
  480.                        2 for double border.
  481.  
  482.             X coordinates are interger expressions between 1 and 80.
  483.             Y coordinates are interger expressions between 1 and 25.
  484.             Refer to the COLOR command for how to calculate color values.
  485.             This command may not work properly if you have other screen
  486.             resolution than 80x25.
  487.  
  488.         Example: 
  489.  
  490.             BORDER 30,5,50,15,30,2
  491.  
  492.  
  493.     2.13  GETKEY
  494.     ============
  495.  
  496.         Purpose: Wait for specified keyboard input.
  497.  
  498.         Format: GETKEY keylist [,DEFAULT=d] [,TIMEOUT=t]
  499.  
  500.         Remarks: 
  501.  
  502.             The return value of GETKEY is placed in the reserved integer
  503.             variable KEYDOWN. You can use the BASIC command IF ... THEN to test
  504.             the value of KEYDOWN after a GETKEY command.
  505.  
  506.             keylist     is a string containing a list of the keys to recognize.
  507.                         If an empty string is supplied any key will be accepted.
  508.  
  509.             DEFAULT=d   - Optional - 
  510.                         specifies which of the keys in keylist that will be
  511.                         returned when TIMEOUT time has elapsed or if the
  512.                         user pressed ENTER. If no DEFAULT value is specified
  513.                         0 is returned and the ENTER key is disabled. 
  514.                         The parameter is an integer expression specifying
  515.                         the item in the keylist, where 1 is the first item.
  516.  
  517.             TIMEOUT=t   - Optional - 
  518.                         specifies how long to wait for user input before
  519.                         returning with the default value or 0 if no DEFAULT
  520.                         is specified. The parameter is an integer expression 
  521.                         specifying the number of seconds to wait.
  522.                         Default value is 0 which means that the program will
  523.                         wait forever or until a key is pressed.
  524.  
  525.         Example: 
  526.  
  527.             GETKEY "12Q", DEFAULT=3, TIMEOUT=60
  528.             IF KEYDOWN = 1 THEN GOTO 100
  529.             IF KEYDOWN = 2 THEN GOTO 200
  530.             IF KEYDOWN = 3 THEN END
  531.  
  532.  
  533.     2.14  EXECUTE
  534.     =============
  535.  
  536.         Purpose: Execute programs from within the Interact
  537.  
  538.         Format:  EXECUTE command
  539.  
  540.         Remarks: 
  541.  
  542.             command    is a string expression specifying the command or file
  543.                        you want to execute in the form of the DOS command line.
  544.                        You can execute DOS commands, .EXE files, .COM files
  545.                        and .BAT files in the shell.
  546.  
  547.             NOTE: There is limited memory available for the programs when you
  548.                   use this function. If you plan to execute other protected
  549.                   mode applications, such as AniPlay, from within Interact,
  550.                   you have to configure the DOS Extenders to use a limited
  551.                   amount of extended memory.
  552.                   Refer to section 4.0 for information on how to configure
  553.                   the DOS Extender used by Interact.
  554.  
  555.         Example: 
  556.  
  557.             EXECUTE "C:\AA\AAPLAY.EXE"  - Execute aaplay
  558.             EXECUTE "C:\COMMAND.COM"    - Execute a DOS shell
  559.  
  560.  
  561.     2.15  OPENWINDOW
  562.     ================
  563.  
  564.         Purpose: Open a text window.
  565.  
  566.         Format:  OPENWINDOW x1, y1, x2, y2, color, type, title
  567.  
  568.         Remarks: 
  569.  
  570.             x1         is an integer expression specifying the left column.
  571.  
  572.             y1         is an integer expression specifying the top row.
  573.  
  574.             x2         is an integer expression specifying the right column.
  575.  
  576.             y2         is an integer expression specifying the bottom row
  577.  
  578.             color      is an integer expression specifyin the color of the
  579.                        Window.
  580.  
  581.             type       is an integer expression specifying the type of the 
  582.                        border. Valid types are 1 for single border and
  583.                        2 for double border and 0 for no border.
  584.  
  585.             title      is a string specifying the window title.
  586.  
  587.             X coordinates are interger expressions between 1 and 80.
  588.             Y coordinates are interger expressions between 1 and 25.
  589.             Refer to the COLOR command for how to calculate color values.
  590.             This command may not work properly if you have other screen
  591.             resolution than 80x25.
  592.  
  593.         Example: 
  594.  
  595.             OPENWINDOW 10, 10, 60, 20, 78, 2, "My Window"
  596.             GETKEY ""
  597.             CLOSEWINDOW
  598.  
  599.  
  600.     2.16  CLOSEWINDOW
  601.     =================
  602.  
  603.         Purpose: Close the topmost text window and restore the background.
  604.  
  605.         Format:  CLOSEWINDOW
  606.  
  607.         Remarks: 
  608.  
  609.                   Close the topmost window and restore the background.
  610.                   You have to close all window you open, but make sure
  611.                   you do not call CLOSEWINDOW without any open windows.
  612.                   To close multiple windows, execute a CLOSEWINDOW command
  613.                   for each window.
  614.  
  615.         Example: 
  616.  
  617.             See OPENWINDOW for example.
  618.  
  619.  
  620.     2.17  PRINT
  621.     ===========
  622.  
  623.         Purpose: Displays data on the screen at cursor position using the
  624.                  current color as et by the COLOR command.
  625.  
  626.         Format: PRINT [list of expressions] [;]
  627.  
  628.         Remarks: 
  629.  
  630.             list of expressions 
  631.                         is a list of numeric and/or string expressions,
  632.                         separated by commas. Any string constants in the list
  633.                         must be enclosed by qoutation marks. If the list does
  634.                         not end with a semicolon the cursor is positioned at
  635.                         the first column on the next row.
  636.  
  637.         Example:
  638.  
  639.             PRINT "Value: ", i
  640.  
  641.  
  642.     2.18  INPUT
  643.     ===========
  644.  
  645.         Purpose: Recieve numerical input from the keyboard.
  646.  
  647.         Format: INPUT ["prompt",] variable
  648.  
  649.         Remarks: 
  650.  
  651.             "prompt"    is a string constant that prompts for the desired
  652.                         input. If no prompt is specified the default prompt
  653.                         "? " will be printed.
  654.  
  655.             variable    is the name of the numeric variable that recieves 
  656.                         the input.
  657.  
  658.         Example:
  659.  
  660.             INPUT "Input x: ", x
  661.             PRINT "Value ", x
  662.  
  663.  
  664.     2.19  IF - THEN
  665.     ===============
  666.  
  667.         Purpose: Makes a decision regarding program flow based on the
  668.                  result of an expression.
  669.  
  670.         Format: IF expression THEN clause
  671.  
  672.         Remarks: 
  673.  
  674.             expression  can be any numeric expression.
  675.  
  676.             clause      can be any Interactive BASIC statement.
  677.  
  678.             If the expression if true (not zero), then the THEN clause
  679.             is executed. THEN is followed by a standard Interactive BASIC 
  680.             command such as, for example, GOTO
  681.  
  682.        Example:
  683.  
  684.            IF i=1 THEN GOTO 100
  685.  
  686.  
  687.     2.20  FOR - TO - NEXT
  688.     =====================
  689.  
  690.         Purpose: Performs a series of instructions in a loop a given number 
  691.                  of times.
  692.  
  693.         Format: FOR variable=x TO y
  694.                 .
  695.                 .
  696.                 .
  697.                 NEXT
  698.  
  699.         Remarks: 
  700.  
  701.             variable    is a variable to be used as a counter.
  702.  
  703.             x           is a numeric expression which is the initial value
  704.                         of the counter.
  705.  
  706.             y           is a numeric expression which is the final value
  707.                         of the counter.
  708.  
  709.             The program lines following the FOR..TO statement are executed
  710.             until the NEXT statement is encountered. Then the counter is 
  711.             incremented by 1. A check is performed to see if the value of
  712.             the counter is now greater than the final value y. If it is not
  713.             greater Interactive BASIC branches back to the statement
  714.             following the FOR..TO statement and the process is repeated.
  715.             If it is not greater, execution continues with the statement
  716.             following the NEXT statement.
  717.  
  718.             WARNING: Do not attempt to branch out of a FOR..TO..NEXT
  719.                      statement with GOTO, it is not supported, and such
  720.                      operations will currupt the internal stack which
  721.                      may cause unexpected results.
  722.  
  723.         Example:
  724.  
  725.             FOR i=0 TO 15
  726.               COLOR i
  727.               PRINT "Color: ", i
  728.             NEXT
  729.  
  730.  
  731.     2.21  GOTO
  732.     ==========
  733.  
  734.         Purpose: Branches unconditionally out of the normal program sequence
  735.                  to a specified label.
  736.  
  737.         Format: GOTO label
  738.  
  739.         Remarks: 
  740.  
  741.             label       specifies a numerical label where the execution
  742.                         will contine. A label is a numerican statemement
  743.                         at the beginning of a line. They are similar to 
  744.                         the line numbers in old style BASIC, although they
  745.                         are not needed unless you want to branch to the
  746.                         line with GOTO or GOSUB.
  747.  
  748.             WARNING: Do not attempt to branch out of a FOR..TO..NEXT
  749.                      statement, it is not supporterd, and such operations
  750.                      will currupt the internal stack which may cause
  751.                      unexpected results.
  752.  
  753.         Example:
  754.  
  755.             This example will print "Hello world" until the program is
  756.             aborted with Ctrl-C.
  757.  
  758.             10 PRINT "Hello world"
  759.                GOTO 10
  760.  
  761.  
  762.     2.22  GOSUB - RETURN
  763.     ====================
  764.  
  765.         Purpose: Branches to and returns from a subroutine.
  766.  
  767.         Format: GOSUB label
  768.  
  769.         Remarks: 
  770.  
  771.             label       is the label of the subroutine.
  772.  
  773.             Refer to the GOTO function regarding labels.
  774.             A subroutine can be called any number of times in a program,
  775.             and a subroutine may be called from within another subroutine.
  776.  
  777.             The RETURN statement causes Interactive BASIC to branch back
  778.             to the statement following the most recent GOSUB statement.
  779.  
  780.         Example:
  781.  
  782.             GOSUB 100
  783.             PRINT "Back from subroutine."
  784.             END
  785.             100 PRINT "Inside subroutine."
  786.             RETURN 
  787.  
  788.  
  789.     2.23  END
  790.     =========
  791.  
  792.         Purpose: End the program.
  793.  
  794.         Format: END [errorlevel]
  795.  
  796.         Remarks: 
  797.  
  798.             If you have changed the color of the screen, or hidden the cursor
  799.             it may look best if you restore things to normal before END.
  800.  
  801.             errorlevel  - Optional -
  802.                         If specified, Interact will exit with errorlevel.
  803.  
  804.  
  805.         Example:
  806.  
  807.             COLOR 7
  808.             CLS
  809.             SHOWCURSOR
  810.             END
  811.  
  812.  
  813.     2.24  REM
  814.     =========
  815.  
  816.         Purpose: Add comments to the source code
  817.  
  818.         Format: REM
  819.  
  820.         Remarks: 
  821.  
  822.             After a REM statement is found the rest of the line is ignored
  823.             and the execution continues at the next line.
  824.  
  825.         Example:
  826.  
  827.             REM  This text is just a comment. 
  828.  
  829.  
  830.  
  831.     3.0   USING INTERACT
  832.     ====================
  833.  
  834.         Starting your Interact presentation:
  835.             An Interact presentation is started by typing 
  836.             "Interact filename" on the DOS command line. The supplied filename
  837.             points to a file containing Interactive BASIC commands defining 
  838.             the presentation.
  839.             As the DOS Extender used by Interact is configured with DOS
  840.             system variables, it may be a good idea to specify the desired
  841.             settings in a batch file starting the demo.
  842.             Refer to section 4.0 for information on DOS Extender Settings.
  843.  
  844.             Example:
  845.  
  846.             -- RUNME.BAT --
  847.             SET DOS4G=quiet          ; Tell the DOS Extender to be quiet.
  848.             SET DOS16M=:1M           ; Use 1MB Extended memory for Interact.
  849.             Interact mydemo.ib       ; Start Interact with the presentation.
  850.             ---------------
  851.  
  852.  
  853.         Using the area definition tool:
  854.  
  855.             The area definition tool is an Interact module that let you
  856.             define areas in a FLI, FLC, GIF or PCX image using the mouse
  857.             pointer and automaticly generate INITAREA statements.
  858.            
  859.             Start Interact and supply the parameter -a and the animation
  860.             or raster file: "Interact -a filename.flc > areadef.txt"
  861.             It is important not to forget the "> areadef.txt" section
  862.             or you will have to retype the area definitions.
  863.             The " > areadef.txt" means that the INITAREA statements will be
  864.             written to the file "areadef.txt". You can include the contents
  865.             of this file directly into the Interactive BASIC file.
  866.          
  867.             Move the mouse pointer to the corner of the first area and press
  868.             the left mouse button. When you have moved the mouse pointer to
  869.             the other corner of the area press the left mouse button again,
  870.             and an INITAREA statement will be generated for the selected area
  871.             whan you have defined all areas.
  872.  
  873.             If you have selected the first corner you can abort the current 
  874.             area definition by pressing the right button.
  875.  
  876.             When you have defined all areas, press the right mouse button
  877.             and the INITAREA statements for all defined areas will be printed
  878.             out. 
  879.  
  880.  
  881.     3.1   TIPS & TRICKS
  882.     ===================
  883.  
  884.         Creating a DOS shell:
  885.             You can create a DOS shell in your demonstration by using the 
  886.             command EXECUTE to execute COMMAND.COM.
  887.  
  888.             Example: EXECUTE "C:\COMMAND.COM"
  889.  
  890.  
  891.         Wait for any key:
  892.             You can ues the function GEYKEY to pause the program and wait
  893.             for any key to be pressed.
  894.  
  895.             Example: GETKEY ""
  896.                      GETKEY "", TIMEOUT=10
  897.  
  898.         Using Interact as a DOS menu system:
  899.             One feature of Interactive BASIC is that the statement END
  900.             can have an optional ERRORLEVEL.
  901.             This means that you can, for example, start Interact from a batch
  902.             file, and then Interact can exit with a specific errorlevel for
  903.             each selected choice, and the batch file can detect the errorlevel
  904.             and run the requested program.
  905.  
  906.             Imagine this Interactive BASIC program:
  907.  
  908.             =================================================================
  909.             MENU "mymenu.flc", "12Q"
  910.             IF ITEM = 1 END 1
  911.             IF ITEM = 2 END 2
  912.             IF ITEM = 3 END
  913.             =================================================================
  914.  
  915.             Start the above Interactive BASIC program from this batch file:
  916.  
  917.             =================================================================
  918.             :START
  919.             Interact mymenu.ib
  920.             if errorlevel 2 goto PROG2
  921.             if errorlevel 1 goto PROG1
  922.             GOTO END
  923.  
  924.             :PROG1
  925.             c:\3ds\3ds.exe
  926.             GOTO START
  927.  
  928.             :PROG2
  929.             call c:\acad\acadr12.bat
  930.             GOTO START
  931.  
  932.             :END
  933.             =================================================================
  934.  
  935.     4.0   TECHNICAL INFORMATION
  936.     ===========================
  937.     
  938.         System requirements: Intel 386/486 based computer.
  939.                              VGA / Super VGA
  940.                              2-3 MB RAM
  941.                              Hard disk
  942.                              MS-DOS version 3.1 or higher
  943.  
  944.         Interact requires 1-2 MB of extended or expanded memory.
  945.         You can see how much memory Interact that is avaialable to Interact
  946.         by looking at the banner displayed by Interact when started without
  947.         parameters. If you use the PRELOAD statement you may need more memory.
  948.  
  949.         For playback of FLI files with 320x200 resolution, a standard
  950.         VGA adapter is requred. For playback of high resolution FLC files,
  951.         a Super VGA adapter is required. Interact is compatible with most
  952.         Super VGA cards avaiable and it has been tested with Video7 VRAM,
  953.         Video7 VRAM II and some VESA adapters.
  954.  
  955.         If you experiences problems playing back animations with higher
  956.         resolution than 320x200, strip your AUTOEXEC.BAT and CONFIG.SYS
  957.         and remove TSR programs and drivers you may not need, you may 
  958.         also check your Super VGA adapter and load a VESA bios extension
  959.         if available.
  960.  
  961.         As the animations are played directly from the hard disk it may be
  962.         a good idea to set up a disk cache at the size of the largest flic.
  963.         This way the flic will only be read from disk the first loop and
  964.         read directly from the cache memory subsequent loops.
  965.  
  966.         The maximum size of the Interactive BASIC program is 64 KB.
  967.         This is a hard coded limit. If you would like to use larger
  968.         files within Interact, please contact the author at the address
  969.         specified at the bottom of this document.
  970.  
  971.         Interact uses the 32-bit Rational Systems DOS/4GW DOS Extender
  972.         version 1.6 which is provided with the Watcom C/386 package.
  973.         This is a separate file called DOS4GW.EXE. This file must be
  974.         located somewhere in the path when you run Interact.
  975.  
  976.         Shelling to other protected mode programs:
  977.  
  978.           All protected mode programs requires some form of extended memory.
  979.           If you intend to run protected mode programs while in a DOS Shell,
  980.           or from the EXECUTE statement, you must make sure that there are
  981.           enough extended memory available. 
  982.           Refer to the item: "DOS/4GW Configuration" later in this section
  983.           for optimal settings.
  984.  
  985.         Mouse handling:
  986.  
  987.           If you have initialized the mouse with the INITAREA statement
  988.           the mouse pointer will be visible while playing the Flic/Raster
  989.           during the MENU statement. You must load a microsoft compatible
  990.           mouse driver before running Interact if you intend to use the mouse.
  991.           In the MENU statement, pressing the right mouse button is the same
  992.           as pressing ENTER.
  993.  
  994.         Mouse pointer colors:
  995.  
  996.           The colors of the mouse pointer are calculated from the colormap
  997.           of the first frame, therefore the mouse pointer may be distorted
  998.           if the Flic uses palette animation.
  999.  
  1000.  
  1001.         DOS/4GW Configuration
  1002.         =====================
  1003.  
  1004.             * Eliminating the DOS/4GW banner.
  1005.               DOS4GW displays a banner each time it is started. To eliminate
  1006.               this banner set the system variable DOS4G to "quiet".
  1007.               Example: SET DOS4G=quiet
  1008.  
  1009.             * If you want to specify the range of exended memory used by
  1010.               Interact, you will have to set the system variable DOS16M
  1011.               with the following syntax:
  1012.  
  1013.               SET DOS16M=[@start_address [-end_address]] [:size]
  1014.  
  1015.               start_address, end_address and size represent numbers in decimal
  1016.               or on hexadecimal (hex requires a 0x prefix). The number may
  1017.               end with a K to specify kilobytes, or an M for megabytes.
  1018.               If no suffix is used, kilobytes is assumed.
  1019.  
  1020.               Examples:
  1021.  
  1022.                 SET DOS16M=@2m-4m      ; Use memory between 2.0-4.0 MB.
  1023.                 SET DOS16M=:1M         ; Use the last megabyte extended memory.
  1024.                                          or as much as available limited to 1MB.
  1025.                 SET DOS16M=@2M         ; Use all memory above 2MB.
  1026.  
  1027.  
  1028.             * Recommended settings:
  1029.               This is the recomended settings for standard use of Interact.
  1030.  
  1031.               SET DOS4G=quiet
  1032.               SET DOS16M=:1M
  1033.  
  1034.               If you intend to use the PRELOAD statement in your 
  1035.               Interactive BASIC program, you will need to increase the memory
  1036.               available for Interact. Add 1 MB memory for each 2-3 preloaded
  1037.               image (640x480), and even more memory if you use higher
  1038.               resolution.
  1039.  
  1040.               If you have problems running Interact, try increasing
  1041.               (or removing) the memory limitations in DOS16M.
  1042.  
  1043.  
  1044.     5.0 HISTORY
  1045.     ===========
  1046.  
  1047.         VERSION 2.0 (January 11, 1993)
  1048.  
  1049.             Featuring:
  1050.             * Mouse support for MENU's
  1051.             * END with Errorlevel
  1052.             * GIF/PCX Support in PLAY/MENU
  1053.             * PRELOAD GIF/PCX files for fast viewing of raster files.
  1054.             * Area Definition Tool
  1055.  
  1056.         VERSION 1.5 (November 1, 1992)
  1057.  
  1058.             The updates in this release are as follows:
  1059.  
  1060.             * New DOS Extender, now supporting HIMEM.SYS, VCPI and DPMI 
  1061.               memory managers.
  1062.  
  1063.             * New commands OPENWINDOW/CLOSEWINDOW let you open and close
  1064.               multiple text windows.
  1065.  
  1066.             * GETKEY now accepts an empty keylist. Can now be used to wait 
  1067.               for any key to be pressed.
  1068.  
  1069.             * Maximum filesize increased to 64 KB.
  1070.  
  1071.         VERSION 1.0 (September 7, 1992)
  1072.  
  1073.             First public release using PharLap 386|DOS Extender 2.2d
  1074.  
  1075.  
  1076.     6.0 DISCLAIMER
  1077.     ==============
  1078.  
  1079.         This program may be copied and distributed without charge or approval
  1080.         from Autodesk AB to any customer using Autodesk products.
  1081.         However, Autodesk AB makes no claims for the accuracy or performance
  1082.         of this software.
  1083.  
  1084.         If you discover any problems with this software, or if you have
  1085.         suggestions for program enhancement, please write them down and
  1086.         mail or FAX them to:
  1087.  
  1088.         Autodesk AB
  1089.         Attn: Christer Janson
  1090.         Box 14261
  1091.         400 20 Göteborg
  1092.         SWEDEN
  1093.  
  1094.         PHONE: (+46)-31-400350
  1095.         FAX: (+46)-31-402932
  1096.  
  1097.